package com.cmict.data.infra.controller.admin.rdb.vo;

import com.cmict.data.framework.common.pojo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;

@ApiModel("管理后台 - 数据库创建 Request VO")
@Data
@ToString(callSuper = true)
public class RdbSql {

    @NotNull(message = "id不能为空")
    private Long id;

    @ApiModelProperty(value = "库类型", required = true)
    private String type;

    @ApiModelProperty(value = "数据库ip", required = true)
    private String ip;

    @ApiModelProperty(value = "数据库端口", required = true)
    private String port;

    @ApiModelProperty(value = "数据库账号", required = true)
    private String username;

    @ApiModelProperty(value = "数据库密码", required = true)
    private String password;

    @ApiModelProperty(value = "数据库名称", required = true)
    private String databaseName;

    @Pattern(regexp = "^$|[\\u4E00-\\u9FA5A-Za-z0-9\\,.!?:;\"，。：；“？！$\\x22_ ]+$",message = "参数不符合规则")
    private String keyword;

    private String tableName;

    private List<String> tableNameList;
}
